package com.taotao.delayjob.core;


import com.taotao.delayjob.core.constant.RetryResult;
import com.taotao.delayjob.core.model.RetryInst;

/**
 * <p>
 *
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2024/7/17 14:55
 */
public interface IRetryHandler {

    /**
     * 重新执行
     *
     * @param rt
     * @return
     * @throws Exception
     */
    RetryResult retry(RetryInst rt) throws Exception;


    /**
     * 回滚
     *
     * @param rt
     * @throws Exception
     */
    default void rollback(RetryInst rt) throws Exception{

    }

}
